<?php
/**
 * Routes configuration
 *
 * In this file, you set up routes to your controllers and their actions.
 * Routes are very important mechanism that allows you to freely connect
 * different urls to chosen controllers and their actions (functions).
 *
 * PHP versions 4 and 5
 *
 * CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
 * Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 *
 * Licensed under The MIT License
 * Redistributions of files must retain the above copyright notice.
 *
 * @copyright     Copyright 2005-2010, Cake Software Foundation, Inc. (http://cakefoundation.org)
 * @link          http://cakephp.org CakePHP(tm) Project
 * @package       cake
 * @subpackage    cake.app.config
 * @since         CakePHP(tm) v 0.2.9
 * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
 */
/**
 * Here, we are connecting '/' (base path) to controller called 'Pages',
 * its action called 'display', and we pass a param to select the view file
 * to use (in this case, /app/views/pages/home.ctp)...
 */
	Router::connect('/', array('controller' => 'home', 'action' => 'index'));
	Router::connect('/home/*', array('controller' => 'home', 'action' => 'index'));
	Router::connect('/tim-kiem', array('controller' => 'listproduct', 'action' => 'search'));
    Router::connect('/deal-hot', array('controller' => 'listproduct', 'action' => 'dealhot'));
    
    
    Router::connect('/san-pham-gian-hang/*', array('controller' => 'listproduct', 'action' => 'sanphamgianhang'));
    Router::connect('/chi-tiet-san-pham-gian-hang/*', array('controller' => 'listproduct', 'action' => 'ctspgh'));
    
	Router::connect('/san-pham-con-ban', array('controller' => 'listproduct', 'action' => 'index'));
    Router::connect('/gian-hang', array('controller' => 'listproduct', 'action' => 'gianhang'));
	Router::connect('/dang-ky', array('controller' => 'home', 'action' => 'register'));
	Router::connect('/dang-nhap', array('controller' => 'login', 'action' => 'index'));
	Router::connect('/chi-tiet-san-pham/*', array('controller' => 'product', 'action' => 'index'));
	Router::connect('/danh-muc-san-pham/*', array('controller' => 'listproduct', 'action' => 'index'));
	Router::connect('/quen-mat-khau.html', array('controller' => 'userscms', 'action' => 'forgot_password'));
    
    Router::connect('/dang-ky-mo-gian-hang', array('controller' => 'registrationshop', 'action' => 'index'));
	Router::connect('/thanh-vien', array('controller' => 'registrationshop', 'action' => 'account'));
	
	
	Router::connect('/mua-hang/*', array('controller' => 'product', 'action' => 'addshopingcart'));
	Router::connect('/gio-hang', array('controller' => 'product', 'action' => 'viewshopingcart'));
	
	Router::connect('/dat-mua', array('controller' => 'product', 'action' => 'datmua'));
	Router::connect('/dat-mua-b2', array('controller' => 'product', 'action' => 'datmua1'));
	Router::connect('/dat-mua-b3', array('controller' => 'product', 'action' => 'datmua2'));
	Router::connect('/dat-mua-b4', array('controller' => 'product', 'action' => 'datmua3'));
	
	Router::connect('/dang-ky-thanh-vien', array('controller' => 'userscms', 'action' => 'index'));
	
	Router::connect('/thong-tin-tai-khoan', array('controller' => 'userscms', 'action' => 'thong_tin_tai_khoan'));
	Router::connect('/thong-tin-tai-khoan/*', array('controller' => 'userscms', 'action' => 'thong_tin_tai_khoan'));
	Router::connect('/thong-tin-don-hang', array('controller' => 'userscms', 'action' => 'thong_tin_don_hang'));
	
	Router::connect('/tien-thuong', array('controller' => 'userscms', 'action' => 'tien_thuong'));
	Router::connect('/ma-du-thuong', array('controller' => 'userscms', 'action' => 'ma_du_thuong'));
	Router::connect('/doi-mat-khau', array('controller' => 'userscms', 'action' => 'change_pass'));
	
	Router::connect('/chi-tiet-tin/*', array('controller' => 'news', 'action' => 'ctnews'));
	
	
// 	Router::connect('/equipment', array('controller' => 'news', 'action' => 'equipment'));
// 	Router::connect('/packing-and-loanding', array('controller' => 'news', 'action' => 'packing'));
// 	Router::connect('/khuyen-mai', array('controller' => 'news', 'action' => 'khuyenmai'));
// 	Router::connect('/ban-do', array('controller' => 'news', 'action' => 'map'));
// 	Router::connect('/chinh-sach-khach-hang', array('controller' => 'news', 'action' => 'chinhsach'));
// 	Router::connect('/tin-tuc/chi-tiet-tin/*', array('controller' => 'news', 'action' => 'view'));
// 	Router::connect('/gioi-thieu/*', array('controller' => 'introductions', 'action' => 'index'));
// 	Router::connect('/tuyen-dung', array('controller' => 'news', 'action' => 'recruitment'));
// 	Router::connect('/lien-he-mua-hang', array('controller' => 'products', 'action' => 'buy'));
// 	Router::connect('/san-pham', array('controller' => 'products', 'action' => 'index'));
	
// 	Router::connect('/danh-sach-san-pham/*', array('controller' => 'products', 'action' => 'listproduct'));
// 	Router::connect('/chi-tiet-san-pham/*', array('controller' => 'products', 'action' => 'view'));
// 	Router::connect('/mua-hang/*', array('controller' => 'products', 'action' => 'addshopingcart'));
// 	Router::connect('/hien-gio-hang-cua-mat-hang', array('controller' => 'products', 'action' => 'viewshopingcart'));
//     Router::connect('/tim-kiem', array('controller' => 'search', 'action' => 'search'));
// 	Router::connect('/binh-chon', array('controller' => 'polls', 'action' => 'index'));
// 	Router::connect('/thu-vien-anh', array('controller' => 'gallery', 'action' => 'index'));
// 	Router::connect('/dang-ky', array('controller' => 'user', 'action' => 'index'));
// 	Router::connect('/dang-nhap', array('controller' => 'login', 'action' => 'index'));
// 	 Router::connect('/lien-he', array('controller' => 'contacts', 'action' => 'send'));
	 
	
/**products/viewshopingcart

 * ...and connect the rest of 'Pages' controller's urls.
 */
	//Router::connect('/pages/*', array('controller' => 'pages', 'action' => 'display'));
